#ifndef XMODULE_H
#define XMODULE_H
#include <stack>
#include <xscript/xitem.h>
#include <xscript/xcallblock.h>
#include <xscript/xnameholder.h>

class XModule : public XNameHolder {
  public:
    XModule();
  public:
    void addCall(XCall::XCallPtr block);
    bool invoke(std::shared_ptr<XVariableTable> table);
  private:
    std::list<XCall::XCallPtr> calls;
    std::stack<XCall::XCallPtr> currentCall;
};

#endif // XMODULE_H
